{% extends "base.html" %}

{% block content %}
<br />
<h2>登录账号</h2>
<hr />
{% if error %}
<p class="alert alert-danger">{{ error }}</p>
{% endif %}
<br />
<div class="row" align="center">
  <div class="col-md-1"></div>
  <div class="col-md-5">
    <form method="post" action="/guess/user/login/">
      {% csrf_token %}
      <table class="table">
        <tr>
          <td>用户名</td>
          <td><input type="text" name="username" value="" /></td>
        </tr>
        <tr>
          <td>密码</td>
          <td><input type="password" name="password" value="" /></td>
        </tr>
      </table>
      <br /><br /><br />
      <input class="btn btn-primary" type="submit" value="登录" />
    </form>
    <br /><br /><br />
  </div>
  <div class="col-md-5">
    <form method="post" action="/guess/user/register/">
      {% csrf_token %}
      <table class="table">
        <tr>
          <td>用户名</td>
          <td><input type="text" name="username" value="" /></td>
        </tr>
        <tr>
          <td>密码</td>
          <td><input type="password" name="password" value="" /></td>
        </tr>
        <tr>
          <td>确认密码</td>
          <td><input type="password" name="re-password" value="" /></td>
        </tr>
      </table>
      <br />
      <input class="btn btn-primary" type="submit" value="注册" />
    </form>
    <br /><br /><br />
  </div>
  <div class="col-md-1"></div>
</div>

{% endblock %}
